package interview.java.q1.internal.secret;

public class AnswerResultMaker {

  public AnswerResultMaker(int n) {
    _n = n;
  }

  public int[][] make() {
    int[][] result = new int[_n][_n];

    int cursor = 1;
    int circle = 0;

    while (cursor <= _n * _n) {
      cursor = new OneCircleFiller(result, cursor, circle).fill();
      circle++;

//      System.out.println(cursor + "," + circle);
//      new AnswerResultPrinter(result).print();
    }

//    cursor = new OneCircleFiller(result, cursor, circle).fill();

    return result;
  }

  private final int _n;
}
